<extend name="Public/base"/>

<!-- 子导航 -->
<block name="sidebar">
	<include file="sidemenu" />
</block>

<block name="body">
	<div class="main-title">
		<h2>预约商品</h2>
	</div>
	<!-- 工具栏 -->
	<div class="product_headcut">
		<div class="f1">
			<div class="add-product">
				<a class="btn" href="admin.php?s=/Good/panicadd/file_type/2.html">新增</a>
			</div>
			<!-- 高级搜索 -->
			<div class="search-form fr cf" style="margin-top: 9px">
				<div class="sleft" >
					<input type="text" name="title" class="search-input" value="{:I('title')}" placeholder="商品ID/商品名称">
					<a class="sch-btn" href="javascript:;" id="search" url="{:U('article/index','pid='.I('pid',0).'&cate_id='.$cate_id,false)}"><i class="btn-search"></i></a>
				</div>
			</div>
		</div>

	</div>


	<!-- 数据表格 -->
	<div class="data-table">
		<table>
			<!-- 表头 -->
			<thead>
			<tr>

				<th>商品ID</th>
				<th>商品名称</th>
				<th>售价</th>
				<th>库存</th>
				<th>销量</th>
				<th>创建时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
			</thead>

			<!-- 列表 -->
			<tbody>
			<tbody>
			<notempty name="_list">
				<volist name="_list" id="vo">
					<tr>

						<td>{$vo.id}</td>
						<td>{$vo.title}</td>
						<td>{$vo.discount_price}</td>
						<td>{$vo.stock}</td>
						<td>{$vo.investcount}</td>
						<td>{$vo['create_time']}</td>
						<td>{$vo.status}</td>
						<td>

							<a href="{:U('Good/panicadd', array('id' => $vo['id'], 'file_type' => '2'))}">编辑</a>
							<a href="{:U('Good/deletegood', array('id' => $vo['id']))}" onclick="if(!confirm('确定删除商品?')){return false;}">刪除</a>
						</td>
					</tr>
				</volist>
				<else/>
				<td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
			</notempty>
			</tbody>

		</table>
		<div class="page">
			{$_page}
		</div>
	</div>
	<!-- 分页 -->
	<div class="page">
		{$_page}
	</div>
	</div>
</block>
<block name="script">
	<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
	<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
	<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
	<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
	<script type="text/javascript">
		$(function() {
			//搜索功能
			$("#search").click(function () {
				var url = $(this).attr('url');
				var query = $('.search-form').find('input').serialize();
				query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
				query = query.replace(/^&/g, '');
				if (url.indexOf('?') > 0) {
					url += '&' + query;
				} else {
					url += '?' + query;
				}
				window.location.href = url;
			});
			//回车搜索
			$(".search-input").keyup(function (e) {
				if (e.keyCode === 13) {
					$("#search").click();
					return false;
				}
			});
			//导航高亮
			highlight_subnav('admin.php?s=/Good/panicproduct.html');
		});
	</script>
</block>
